package com.sinosoft.dsp.component.bpm.viewbean.activity.part;

import java.util.ArrayList;
import java.util.List;

import com.sinosoft.dsp.component.bpm.viewbean.BpmFieldObject;
import com.sinosoft.dsp.component.bpm.viewbean.activity.BpmAbstractActivityPartEditViewBean;
import com.sinosoft.dsp.component.bpm.viewbean.activity.IBpmActivityPartEditViewBean;

public class BpmActivityFieldsViewBean extends
		BpmAbstractActivityPartEditViewBean implements
		IBpmActivityPartEditViewBean {

	// 活动的字段属性
	private List<BpmFieldObject> activityFields = new ArrayList<BpmFieldObject>();

	private BpmFieldObject[] selectedRows;

	public List<BpmFieldObject> getActivityFields() {
		return activityFields;
	}

	public void setActivityFields(List<BpmFieldObject> activityFields) {
		this.activityFields = activityFields;
	}

	public void addActivityField() {
		this.activityFields.add(new BpmFieldObject());
	}

	public void removeActivityField() {
		if (selectedRows != null && selectedRows.length > 0) {
			for (BpmFieldObject a : selectedRows) {
				this.activityFields.remove(a);
			}
		}
	}

	public BpmFieldObject[] getSelectedRows() {
		return selectedRows;
	}

	public void setSelectedRows(BpmFieldObject[] selectedRows) {
		this.selectedRows = selectedRows;
	}

}
